<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:pr="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/WEB-INF/facelets/admintemplate.xhtml">

        <ui:param name="title" value="Admin"/>

        <ui:define name="admincontent">
            <h1>This is admin/main.xhtml</h1>

            

            <h:form id="form" enctype="multipart/form-data">


                <h:panelGrid id="editproduct" columns="3">
                    <h:outputText value="Web Shop Name: " /> 
                    <pr:inputText id="webshopname" value="#{prefBean.webshopname}">
                        <f:validateLength minimum="3"/>
                    </pr:inputText>
                    <pr:message for="webshopname"/>

                    <h:outputText value="Discription:" /> 
                    <pr:inputText id="discription" value="#{prefBean.description}">
                        <f:validateLength minimum="3"/>
                    </pr:inputText>
                    <pr:message for="discription"/>

                    <h:outputText value="Keywords:" /> 
                    <pr:inputText id="keywords" value="#{prefBean.keywords}">
                        <f:validateLength minimum="3"/>
                    </pr:inputText>
                    <pr:message for="keywords"/>

                    <h:outputText value="Author:" /> 
                    <pr:inputText id="author" value="#{prefBean.author}">
                        <f:validateLength minimum="3"/>
                    </pr:inputText>
                    <pr:message for="author"/>


                    <h:outputText value="Show Alert Message: " />  
                    <pr:selectBooleanCheckbox id="showAlertMessage" value="#{prefBean.showAlertMessage}" /> 
                    <pr:message for="showAlertMessage"/>

                    <h:outputText value="Alert Message:" /> 
                    <pr:inputText id="alertMessage" value="#{prefBean.alertMessage}">
                        <f:validateLength minimum="3"/>
                    </pr:inputText>
                    <pr:message for="alertMessage"/>

                    <h:outputText value="Offline Message:" /> 
                    <pr:inputText id="offlinemessage" value="#{prefBean.offlineMessage}">
                        <f:validateLength minimum="3"/>
                    </pr:inputText>
                    <pr:message for="offlinemessage"/>

                    <!--<h:outputText value="Site Offline: " />  
                     <pr:selectBooleanCheckbox id="siteOffline" value="#{prefBean.siteOffline}" /> 
                     <pr:message for="siteOffline"/> -->




                </h:panelGrid>

                <pr:growl id="messages" showDetail="true" />  


                <h:panelGrid columns="1" cellpadding="5">  


                    <pr:commandButton value="Save Preferences" onclick="confirmation.show()" type="button"/>  
                </h:panelGrid>  


                <pr:confirmDialog message="Are you sure you want to save these preferences?"  
                                  header="Save Preferences" severity="alert" widgetVar="confirmation">  
                    <pr:commandButton value="Yes" update="messages" oncomplete="confirmation.hide()" action="#{prefBean.savePreferences()}"  
                                      actionListener="#{primefacesBean.savePreferences}" />  
                    <pr:commandButton value="No" onclick="confirmation.hide()" type="button" />   

                </pr:confirmDialog> 

            </h:form>





        </ui:define>
    </ui:composition>
</html>

